On the shift-table in Boyer-Moore's String Matching Algorithm

نویسنده

  • Yang Wang
چکیده

The Boyer-Moore’s string matching algorithm uses two pre-computed tables skip, which utilizes the occurrence heuristic of symbols in a pattern, and shift, which utilizes the match heuristic of the pattern, for searching a string. Some experts have pointed out that the difficulty of understanding the computation of the shift table has hindered utilization of the algorithm in a wider range of applications. This paper describes an alternative way to compute the shift table. We believe that the new method is more intuitive and straightforward both conceptually and logically than the original method, and thus, easier to understand and to implement. Also, the new method has a O(m) complexity in both required space and time for a pattern of length m. Therefore, it preserves the high performance of the Boyer-Moore algorithm.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A new method to obtain the shift-table in Boyer-Moore's string matching algorithm

The Boyer-Moore algorithm uses two pre-computed tables for searching a string: skip, which utilizes the occurrence heuristic of symbols in a pattern, and shift, which utilizes the match heuristic of the pattern. Researchers have pointed out that the difficulty of understanding the computation of the shift table has hindered utilization of the algorithm in a wider range of applications. This pap...

متن کامل

A fast implementation of the Boyer–Moore string matching algorithm

String matching is the problem of finding all the occurrences of a pattern in a text. We present a new method to compute a combinatorial shift function (“best matching shift”) of the well-known Boyer–Moore string matching algorithm. Moreover we conduct experiments showing that the algorithm using this best matching shift is the most efficient in particular cases such as the search for patterns ...

متن کامل

The Filtering Approaches for the Improved Boyer-Moore Approximate String Matching

The Boyer-Moore algorithm is to solve exact string matching. Here, the Bad Character Rule of the Boyer-Moore algorithm is extended to solve approximate string matching. Although Tarhio and Ukkonen introduce a basic algorithm, it is similar to the Horsool algorithm. We utilize the concept of their algorithm to implement the Bad Character Rule, and we will obtain a new shift length. When the wind...

متن کامل

Fast Hybrid String Matching Algorithm based on the Quick-Skip and Tuned Boyer-Moore Algorithms

The string matching problem is considered as one of the most interesting research areas in the computer science field because it can be applied in many essential different applications such as intrusion detection, search analysis, editors, internet search engines, information retrieval and computational biology. During the matching process two main factors are used to evaluate the performance o...

متن کامل

On obtaining the Boyer-Moore string-matching algorithm by partial evaluation

We present the first derivation of the search phase of the Boyer-Moore stringmatching algorithm by partial evaluation of an inefficient string matcher. The derivation hinges on identifying the bad-character-shift heuristic as a bindingtime improvement, bounded static variation. An inefficient string matcher incorporating this binding-time improvement specializes into the search phase of the Hor...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • JDCTA

دوره 3  شماره 

صفحات  -

تاریخ انتشار 2009